package com.mytest.DynamicProxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class TGP implements InvocationHandler {

    private Game game;

    public TGP(Game game) {
        this.game = game;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

        System.out.println("TGP开始优化游戏环境...");
        method.invoke(game, args);
        System.out.println("游戏已正常启动...");

        return null;
    }

}
